
"use strict"
var call = require("../../utils/request.js")
const app = getApp()
Page({
  data: {
    userInfo: '',
    birthday: '请选择日期',
    // cardid: '请输入身份证号',
    // phone: '请输入手机号'
    cardid: '',
    phone: '',
    money:''
  },

  onLoad: function(e) {
    if (wx.getStorageSync("uid")) {

          var call = require("../../utils/request.js")
          var url = 'getmoney?uid=' + wx.getStorageSync("uid");
          call.getData(url, this.getmoney, this.fail)

    } else {

      setTimeout(() => {
        wx.showToast({
          title: '请先授权登录',
          icon: "none",
        });
        setTimeout(() => {
          wx.switchTab({
            url: '../mine/mine'
          })
        }, 2000)
      }, 0);
    }

  },

  getmoney: function (data) {

    this.setData({
      money: data.data
    })
  },
  gohome: function (data) {
    wx.reLaunch({
      url: '../index/index',
    })
  },

  chongzhi: function (data) {
    wx.reLaunch({
      url: '../pageck/recharge',
    })
  },


  tixian: function (data) {
    wx.showToast({  
      title: '功能暂未开放',  
      icon: 'loading',  
      duration: 1000  
  })  
  },


  yinhangka: function (data) {
    wx.showToast({  
      title: '功能暂未开放',  
      icon: 'loading',  
      duration: 1000  
  })  
  },
  mingxi: function (data) {
    wx.reLaunch({
      url: '../pageck/list',
    })
  },


  rizhi: function (data) {
    wx.showToast({  
      title: '功能暂未开放',  
      icon: 'loading',  
      duration: 1000  
  })  
  },

  chongzhi: function (data) {
    wx.reLaunch({
      url: '../pageck/recharge',
    })
  },




})